﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        <form id="form">
            ZooEntity：<input type="text" name="objZooEntity" value='{zoo:"zoo",bar:"bar",baz:"baz"}' />
            <input type="button" id="btn_submit" value="提交" />
        </form>
    </div>
    <script src="~/Content/js/jquery-1.8.2.js"></script>
    <script src="~/Content/js/tjzheng.js"></script>
    <script type="text/javascript">
        $("#btn_submit").click(function () {
            var objFormEntity = new FormEntity("#form");
            //objFormEntity.data = $("input[name=objZooEntity]").val();
            objFormEntity.submitSuccess = function (data) {
                alert(JSON.stringify(data));
            }
            //objFormEntity.submited = function () {
            //    alert("我先执行了吗");
            //}
            objFormEntity.isClearData = false;
            objFormEntity.contentType = "application/json";
            //objFormEntity.url = "/Home/PostParams";
            objFormEntity.url = "/Home/PostSimpleEntity";
            objFormEntity.submit();
        });
    </script>
</body>
</html>
